/*
 * @Author: chenxin
 * @Date: 2020-11-09 14:45:32
<<<<<<< HEAD
<<<<<<< HEAD
 * @LastEditTime: 2021-06-01 09:38:23
 * @LastEditors: Please set LastEditors
=======
 * @LastEditTime: 2020-12-25 14:42:59
 * @LastEditors: Please set LastEditors
>>>>>>> chenxin
=======
 * @LastEditTime: 2020-12-26 16:58:56
 * @LastEditors: Please set LastEditors
>>>>>>> greatwwy
 * @Description: 人员信息相关、部门相关、仓库相关、工作流相关、字典表相关
 * @FilePath: \cang-chu-guan-li-xi-tong\src\services\modules\common.js
 */
// 引入axios | 路径配置
import { AJAX_PATH } from "@/services/config.js";

// 导入 封装的 有权限请求2
import { HTTP_LIMITED, service } from "@/utils/axios.js";

class CommonAjax extends HTTP_LIMITED {



  // 获取制单人接口-转库用
  getRepareBy() {
    return this._get(AJAX_PATH.getRepareBy);
  }
  // 获取制单人接-组装用
  getPrepareBy() {
    return this._get(AJAX_PATH.getPrepareBy);
  }

  // 获取制单人接口-库存调整用
  getPrepareBytransformation() {
    return this._get(AJAX_PATH.getPrepareBytransformation);
  }


  // 获取用户权限接口
  getUserRightsByToken(options) {
    return this._get(
      AJAX_PATH.getUserRightsByToken + `?token=${options}&nav=仓储管理系统`,
      {}
    );
  }
  // 返回所有的仓库编码、仓库名称 newU8c
  getAllNumberName_new_forU8c() {
    return this._get(AJAX_PATH.getAllNumberName_new_forU8c);
  }

  //存货信息档案-根据存货名称模糊搜索
  getqueryInventoryBySpec(data) {
    return this._get(AJAX_PATH.getqueryInventoryBySpec + data);
  }
  // 存货信息档案-根据存货编码模糊搜索
  getqueryInventoryByInvcode(data) {
    return this._get(AJAX_PATH.getqueryInventoryByInvcode + data);
  }
  //转库列表获取单据号
  getzhuankudanju(data) {
    return this._get(AJAX_PATH.getzhuankudanju + data);
  }
  //采购入库源单获取单据号
  getAllSourceNumber(data) {
    return this._get(AJAX_PATH.getAllSourceNumber, data);
  }

  // 获取供应商列表
  getpurchasesupplier_U8c() {
    return this._get(AJAX_PATH.getpurchasesupplier_U8c);
  }


  // 获取供应商列表
  getSupplierInfo() {
    return this._get(AJAX_PATH.getSupplierInfo);
  }
  //根据分类获取该分类下的供应商
  getSupplierInfoByArea(data, queryPath) {
    return this._post(AJAX_PATH.getSupplierInfoByArea + queryPath, data);
  }
  // -------- 人员信息相关 ---------
  // 根据角色名来获取用户详细信息
  getUserByRoleName(data) {
    return this._get(AJAX_PATH.getUserByRoleName + data);
  }
  // 根据用户id获取用户的详细信息
  getUserInfoByUserId(data) {
    return this._get(AJAX_PATH.getUserInfoByUserId + data);
  }
  // 根据 ID 获取 对应的职务
  getPositionById(options) {
    return this._get(AJAX_PATH.getPositionById + `?id=${options}`, {});
  }
  //根据用户id查询用户名、工号
  getUserNameByUserId(data) {
    return this._get(AJAX_PATH.getUserNameByUserId + data);
  }
  //根据角色名查询用户名、用户id
  getUserRoleNameByUserNameId(queryPath) {
    return this._get(AJAX_PATH.getUserRoleNameByUserNameId + queryPath);
  }
  //根据工号查询用户名、用户id
  getqueryNameAndIdByWorkNo(queryPath) {
    return this._get(AJAX_PATH.getqueryNameAndIdByWorkNo + queryPath);
  }

  // 根据TOKEN获取用户的部分信息
  getUserByToken(data) {
    return this._get(AJAX_PATH.getUserByToken + data);
  }
  // -------- 部门相关 ---------
  // 获取部门列表
  getDepartmentList() {
    return this._get(AJAX_PATH.getDepartmentList);
  }
  // 获取部门列表-树状形式
  getdepartmentlistTree() {
    return this._get(AJAX_PATH.getdepartmentlistTree);
  }

  // -------- 仓库相关 ---------
  // 获取仓库单号
  getDepotOrder() {
    return this._get(AJAX_PATH.getDepotOrder);
  }
  // 获取所有仓库名称和id
  getStorageName() {
    return this._get(AJAX_PATH.getStorageName);
  }
  // 获取所有存货名称和id
  getInventoryInformation() {
    return this._get(AJAX_PATH.getInventoryInformation);
  }
  // 通过仓库Id获取所有存货编码和名称
  getInventoryInformationByStorageId(queryPath) {
    return this._get(AJAX_PATH.getInventoryInformation + queryPath);
  }
  // 通过存货id 获取存货批次号
  getBatchNumberList(queryPath) {
    return this._get(AJAX_PATH.getBatchNumberList + queryPath);
  }
  // 获取单据号
  getOrder(queryPath) {
    return this._get(AJAX_PATH.getOrder + queryPath);
  }
  // 获取单据号列表
  getOrderList(queryPath) {
    return this._get(AJAX_PATH.getOrderList + queryPath);
  }
  // 获取单据号列表-tuikuyong
  getOrderListTuiKu(queryPath) {
    return this._get(AJAX_PATH.getOrderListTuiKu + queryPath);
  }
  // 获取生产材料源单列表
  getSourceNumber(queryPath) {
    return this._get(AJAX_PATH.getSourceNumber + queryPath);
  }
  // 获取制单人接口
  getPreparedyList() {
    return this._get(AJAX_PATH.getPreparedyList);
  }
  // 获取全部的仓位信息
  getPositionInformationList() {
    return this._get(AJAX_PATH.getPositionInformationList);
  }
  //获取收发类别列表
  getReceiveSendTypeList(queryPath) {
    return this._get(AJAX_PATH.getReceiveSendTypeList + queryPath);
  }

  //出库货架查询
  getqueryShelves(queryPath) {
    return this._get(AJAX_PATH.getqueryShelves + queryPath);
  }


  // 获取转换类别
  getWarehouseTransferType() {
    return this._get(AJAX_PATH.getWarehouseTransferType);
  }
  getReceiveSendTypeByName(data) {
    return this._get(AJAX_PATH.getReceiveSendTypeByName + data);
  }
  GetSaveCargoClassification() {
    //存货分类-存货分类树
    return this._get(AJAX_PATH.GetSaveCargoClassification);
  }
  getInventoryByDepotId(queryPath) {
    // 根据仓库ID获取存货信息
    return this._get(AJAX_PATH.getInventoryByDepotId + queryPath);
  }
  // -------- 字典表相关 ---------
  // 获取包装形式
  getPackagingTypeList() {
    return this._get(AJAX_PATH.getPackagingTypeList);
  }
  // 获取销售部门
  getSaleDepartment() {
    return this._get(AJAX_PATH.getSaleDepartment);
  }
  // 获取辅助单位
  getAuxiliaryUnit() {
    return this._get(AJAX_PATH.getAuxiliaryUnit);
  }
  // 是否赠品列表
  getWarehouseGiveaway() {
    return this._get(AJAX_PATH.getWarehouseGiveaway);
  }
  // 获取凭证辅助核算字典表
  getSupplementaryAccountingInfo() {
    return this._get(AJAX_PATH.getSupplementaryAccountingInfo);
  }
  // 获取组装类型字典表
  getAssemblyList() {
    return this._get(AJAX_PATH.getAssemblyList);
  }
  getAuditMarkAndDocumentStatus() {
    //获取单据状态（已审核、未审核、全部）
    return this._get(AJAX_PATH.getAuditMarkAndDocumentStatus);
  }
  // 获取所有的成套件列表
  getAllPackageList() {
    return this._get(AJAX_PATH.getAllPackageList);
  }
  // 获取所有的客户列表
  getAllClientList() {
    return this._get(AJAX_PATH.getAllClientList);
  }
  // 根据仓库Id查询仓位信息
  getPositionInformationListByDepotId(queryPath) {
    return this._get(AJAX_PATH.getPositionInformationListByDepotId + queryPath);
  }

  // ----------------所有的出入库接口----------------
  // 新增出入库表单和物品信息
  addInOrOutStorageOrderAndGoods(data) {
    return this._post(AJAX_PATH.addInOrOutStorageOrderAndGoods, data);
  }
  // 更新出入库表单和物品信息
  updateInOrOutStorageOrderAndGoods(data) {
    return this._post(AJAX_PATH.updateInOrOutStorageOrderAndGoods, data);
  }
  //退库申请表-一个接口修改
  warehousereturnrequest(data) {
    return this._post(AJAX_PATH.warehousereturnrequest, data);
  }
  // 删除出入库表单和物品信息
  deleteInOrOutStorageOrderAndGoods(queryPath) {
    return this._get(AJAX_PATH.deleteInOrOutStorageOrderAndGoods + queryPath);
  }
  // 新增出入库表单中的物品信息
  addInOrOutStorageGoods(data) {
    return this._post(AJAX_PATH.addInOrOutStorageGoods, data);
  }
  // 仅删除出入库表单的物品信息
  deleteInOrOutStorageGoods(queryPath) {
    return this._get(AJAX_PATH.deleteInOrOutStorageGoods + queryPath);
  }
  // 获取出入库表单和物品信息的列表
  getInOrOutStorageOrderAndGoodsList(queryPath) {
    return this._get(AJAX_PATH.getInOrOutStorageOrderAndGoodsList + queryPath);
  }
  // 通过单据Id获取出入库表单和物品信息
  getInOrOutStorageOrderAndGoodsInfoById(queryPath) {
    return this._get(
      AJAX_PATH.getInOrOutStorageOrderAndGoodsInfoById + queryPath
    );
  }
  // 修改出入库单据信息,修改单据的审核标志
  // 修改出入库单据信息,修改单据的审核标志
  updateInOrOutStorageOrder(data) {
    return this._post(AJAX_PATH.updateInOrOutStorageOrder, data);
  }

  // ----------------根据原单生成接口----------------
  // 获取销售订单
  getSaleOrderList(queryPath) {
    return this._get(AJAX_PATH.getSaleOrderList + queryPath);
  }
  // 根据销售订单Id查询销售订单中的物品
  getSaleGoodsByOrderId(queryPath) {
    return this._get(AJAX_PATH.getSaleGoodsByOrderId + queryPath);
  }

  // 获取备货通知列表
  getStockNoticeList(queryPath) {
    return this._get(AJAX_PATH.getStockNoticeList + queryPath);
  }

  // 根据备货通知Id查询备货通知单中的信息
  getSaleGoodsByStockNoticeId(queryPath) {
    return this._get(AJAX_PATH.getSaleGoodsByStockNoticeId + queryPath);
  }

  // 根据 备货通知单据 和 存货 Id 进行查询的接口
  getStockNoticeGoodsList(queryPath) {
    return this._post(AJAX_PATH.getStockNoticeGoodsList, queryPath);
  }

  getgetBatchNumberById(queryPath) {
    return this._get(AJAX_PATH.getgetBatchNumberById + queryPath);
  }

  getReceiveSendTypeListAll() {
    return this._get(AJAX_PATH.getReceiveSendTypeListAll);
  }
  //模糊查询存货信息
  getSearchInventoryInformationFile(queryPath) {
    return this._get(AJAX_PATH.getSearchInventoryInformationFile + queryPath);
  }
  //存货模糊查询
  getgetSearchInventoryInformationFile(queryPath) {
    return this._get(
      AJAX_PATH.getgetSearchInventoryInformationFile + queryPath
    );
  }

  // 根据客户名称进行模糊查询
  getSearchClientList(queryPath) {
    return this._get(AJAX_PATH.getSearchClientList + queryPath);
  }

  // !获取对应仓库下物品的总数量
  getTotalGoodsQuantity(queryPath) {
    return this._get(AJAX_PATH.getTotalGoodsQuantity + queryPath);
  }

  // !获取现存数量
  getExistingQuantity(data) {
    return this._post(AJAX_PATH.getExistingQuantity, data);
  }

  // !源单中剩余未出库完毕的货物的数量
  getQuantityUnfinishedGoods(data) {
    return this._post(AJAX_PATH.getQuantityUnfinishedGoods, data);
  }

  // 数量验证-其他出库-查询源单剩余可出库数量
  getEnableOutOther(data) {
    return this._post(AJAX_PATH.getEnableOutOther, data);
  }
  // 数量验证-基建出库-查询源单剩余可出库数量
  getEnableOutInfrastructure(data) {
    return this._post(AJAX_PATH.getEnableOutInfrastructure, data);
  }

  // 获取库存组织列表,不分页获取全部的
  getSyncInventoryOrganizationList() {
    return this._get(AJAX_PATH.getSyncInventoryOrganizationList);
  }
  // 获取公司
  getpk_corpList() {
    return this._get(AJAX_PATH.getpk_corpList);
  }
  // 通过用户姓名获取人员信息
  getUserInfoByUserName(queryPath) {
    return this._get(AJAX_PATH.getUserInfoByUserName + queryPath);
  }
  // 获取全部的业务类型
  getSyncBusinessTypeVoList() {
    return this._get(AJAX_PATH.getSyncBusinessTypeVoList);
  }

  // 库存组织-列表
  getInventoryOrganization(queryPath) {
    return this._get(AJAX_PATH.getInventoryOrganization + queryPath);
  }
  // 根据客户姓名模糊查询客户信息
  getCustomerInfoByName(queryPath) {
    return this._get(AJAX_PATH.getCustomerInfoByName + queryPath);
  }
  // 公司-返回公司树
  getCompanyTree() {
    return this._get(AJAX_PATH.getCompanyTree);
  }
  // 客商管理档案-根据客户名模糊查询客户
  queryByLikeName(data) {
    return this._get(AJAX_PATH.queryByLikeName + data);
  }
  // 部门档案-返回部门树
  getDepartmentTreeNew() {
    return this._get(AJAX_PATH.getDepartmentTreeNew);
  }

  // 销售订单Id
  getSaleInfoById(queryPath) {
    return this._get(AJAX_PATH.getSaleInfoById + queryPath);
  }

  // 按仓库档案主键查询库管员
  getselectKeeperByPkStordoc(data) {
    return this._get(AJAX_PATH.getselectKeeperByPkStordoc + data);
  }

  // 根据仓库查存货
  getTotalGoods(data) {
    return this._post(AJAX_PATH.getTotalGoods, data);
  }
  // 采购订单表-分页查询列表
  getpurchaseaddorder(queryPath) {
    return this._get(AJAX_PATH.getpurchaseaddorder + queryPath);
  }

  getSyncregionalClassiFicationListByName(queryPath) {
    return this._get(
      AJAX_PATH.getSyncregionalClassiFicationListByName + queryPath
    );
  }
  //采购订单编号模糊查询
  getpurchaseorderNo(queryPath) {
    return this._get(
      AJAX_PATH.getpurchaseorderNo + queryPath
    );
  }

  //==============用友同步数据===========
  //同步用友数存货信息档案
  /*   asyncInventoryInfoFile() {
      return this._get(AJAX_PATH.asyncInventoryInfoFile);
    } */

  asyncInventoryInfoFile(data) {
    return this._get(AJAX_PATH.asyncInventoryInfoFile + data);
  }
  //同步用友库存组织
  /*   asyncWarehouseArchives() {
      return this._get(AJAX_PATH.asyncWarehouseArchives);
    } */
  asyncWarehouseArchives(data) {
    return this._get(AJAX_PATH.asyncWarehouseArchives + data);
  }

  //同步用友存货分类信息
  /* asyncInventoryClassification() {
    return this._get(AJAX_PATH.asyncInventoryClassification);
  } */
  asyncInventoryClassification(data) {
    return this._get(AJAX_PATH.asyncInventoryClassification + data);
  }

  //同步用友计量档案
  /* asynccMeasurementFiles() {
    return this._get(AJAX_PATH.asynccMeasurementFiles);
  } */
  asynccMeasurementFiles(data) {
    return this._get(AJAX_PATH.asynccMeasurementFiles + data);
  }
  /* ------ 退库 ------ */
  // 通过源单生成数组（用于退库申请）
  getArrayListByOriginDocument(queryPath) {
    return this._get(AJAX_PATH.getArrayListByOriginDocument + queryPath);
  }
  // 根据源单生成,表头Id查询数组（用于退库申请）
  getArrayListByOriginDocumentHeaderId(queryPath) {
    return this._get(
      AJAX_PATH.getArrayListByOriginDocumentHeaderId + queryPath
    );
  }
  getArrayListByOriginId(queryPath) {
    return this._get(
      AJAX_PATH.getArrayListByOriginId + queryPath
    );
  }
  // 根据id删除退库申请单
  getturnrequestformdelete(queryPath) {
    return this._get(AJAX_PATH.getturnrequestformdelete + queryPath);
  }
  // 保存退库申请信息
  saveStockReturnInfo(data) {
    return this._post(AJAX_PATH.saveStockReturnInfo, data);
  }
  // 修改退库表单
  updateStockReturnInfo(data) {
    return this._post(AJAX_PATH.updateStockReturnInfo, data);
  }
  // 修改退库物品
  updateStockReturnInventoryInfo(data) {
    return this._post(AJAX_PATH.updateStockReturnInventoryInfo, data);
  }
  // 获取退库申请列表 用于列表页和详情页
  getOutStorageApplyList(queryPath) {
    return this._get(AJAX_PATH.getOutStorageApplyList + queryPath);
  }
  // 根据退库申请Id获取退库数据
  getOutStorageApplyInfoById(queryPath) {
    return this._get(AJAX_PATH.getOutStorageApplyInfoById + queryPath);
  }

  // 退库
  // 通过源单生成数组（用于出库退库）
  getArrayListByApplyOriginDocument(queryPath) {
    return this._get(AJAX_PATH.getArrayListByApplyOriginDocument + queryPath);
  }
  // 根据源单生成,表头Id查询数组（用于出库退库Id）
  getArrayListByApplyOriginDocumentHeaderId(queryPath) {
    return this._get(
      AJAX_PATH.getArrayListByApplyOriginDocumentHeaderId + queryPath
    );
  }
  // 保存退库信息
  saveOutStockInfo(data) {
    return this._post(AJAX_PATH.saveOutStockInfo, data);
  }
  // 修改退库信息
  updateOutStockInfo(data) {
    return this._post(AJAX_PATH.updateOutStockInfo, data);
  }
  updateStockInventoryInfo(data) {
    return this._post(AJAX_PATH.updateStockInventoryInfo, data);
  }
  // 获取退库申请列表 用于列表页和详情页
  getOutStorageList(queryPath) {
    return this._get(AJAX_PATH.getOutStorageList + queryPath);
  }
  // 获取仓库中货架列表
  queryStorageShelvesList(queryPath) {
    return this._get(AJAX_PATH.queryStorageShelvesList + queryPath);
  }
  // 保存货架信息
  saveGoodsShelvesInfo(data) {
    return this._post(AJAX_PATH.queryStorageShelvesList, data);
  }
  // 获取业务流程
  getBusinessTypeInfo() {
    return this._get(AJAX_PATH.getBusinessTypeInfo);
  }
  // 基建工作流-修改
  updateJiJian(queryPath) {
    return this._post(AJAX_PATH.updateJiJian, queryPath);
  }
  // 基建工作流表单-修改
  updateJiJianBiaoDan(queryPath) {
    return this._post(AJAX_PATH.updateJiJianBiaoDan, queryPath);
  }
  // 其它工作流-修改
  updateQiTa(queryPath) {
    return this._post(AJAX_PATH.updateQiTa, queryPath);
  }
  // 其它工作流表单-修改
  updateQiTaBiaoDan(queryPath) {
    return this._post(AJAX_PATH.updateQiTaBiaoDan, queryPath);
  }
  // 保存货架信息
  saveShelfInfo(data) {
    return this._post(AJAX_PATH.saveShelfInfo, data);
  }
  // 改变销售订单表单信息
  changeSaleOrderInfo(data) {
    return this._post(AJAX_PATH.changeSaleOrderInfo, data);
  }
  // 改变销售订单物品信息
  changeSaleGoodsInfo(data) {
    return this._post(AJAX_PATH.changeSaleGoodsInfo, data);
  }

  //根据制单人获取该制单人的部门
  getDeptByUserId(queryPath) {
    return this._get(AJAX_PATH.getDeptByUserId + queryPath);
  }

  // 获取供应商树信息,用于其他页面下拉框加载
  GetSupplierTreeList(queryPath) {
    return this._get(AJAX_PATH.GetSupplierTreeList + queryPath);
  }

  // 获取客户名称信息
  getCustomerNameInfo(data) {
    return this._get(AJAX_PATH.getCustomerNameInfo + data);
  }
  //退库申请表表头-修改
  warehousereturnrequest_back_check(data) {
    return this._post(AJAX_PATH.warehousereturnrequest_back_check, data);
  }

  // 获取用友分厂名称
  getUFIDAFactoryName() {
    return this._get(AJAX_PATH.getUFIDAFactoryName);
  }

  passwordChange(options) {
    return this._get(AJAX_PATH.passwordChange + `?${options}`);
  }
  /*+++++++++++++++++++++++++++++++++++++++++++++++++导出集合++++++++++++++++++++++++++++++++++++++++  */
  //存货信息档案导出
  inventoryfiledataexportExcel() {
    return this._exportExcel(AJAX_PATH.inventoryfiledataexportExcel);
  }

  // 下载期初数据模板
  downloadTemplete() {
    return this._exportExcel(AJAX_PATH.downloadTemplete);
  }
  // 期初数据录入页面导出
  beginningdataentryExportExcel(queryPath) {
    return this._exportExcel(AJAX_PATH.beginningdataentryExportExcel + queryPath);
  }

  // 采购入库列表导出
  warehousedepotformexportyExportExcel(queryPath) {
    return this._exportExcel(AJAX_PATH.warehousedepotformexportyExportExcel + queryPath);
  }

  // 产成品入库列表导出
  exportProductIn(queryPath) {
    return this._exportExcel(AJAX_PATH.exportProductIn + queryPath);
  }

  // 其他入库列表导出
  exportOtherIn(queryPath) {
    return this._exportExcel(AJAX_PATH.exportOtherIn + queryPath);
  }

  // 销售出库列导出
  exportSaleOut(queryPath) {
    return this._exportExcel(AJAX_PATH.exportSaleOut + queryPath);
  }

  // 生产材料出库列表导出
  exportProductionMaterialsOut(queryPath) {
    return this._exportExcel(AJAX_PATH.exportProductionMaterialsOut + queryPath);
  }
  // 基建出库列表导出
  exportInfrastructureOut(queryPath) {
    return this._exportExcel(AJAX_PATH.exportInfrastructureOut + queryPath);
  }
  //  其他出库列表导出
  exportOtherOut(queryPath) {
    return this._exportExcel(AJAX_PATH.exportOtherOut + queryPath);
  }
  // 采购入库退库列表的导出
  exportPurchaseIn(queryPath) {
    return this._exportExcel(AJAX_PATH.exportPurchaseIn + queryPath);
  }
  // 销售出库退库列表的导出
  exportSaleBackOut(queryPath) {
    return this._exportExcel(AJAX_PATH.exportSaleBackOut + queryPath);
  }
  // 生产材料出库退库列表的导出
  exportProductReturn(queryPath) {
    return this._exportExcel(AJAX_PATH.exportProductReturn + queryPath);
  }
  // 基建出库退库列表的导出
  exportInfrastructureReturn(queryPath) {
    return this._exportExcel(AJAX_PATH.exportInfrastructureReturn + queryPath);
  }
  // 其他出库退库列表的导出
  exportInotherReturn(queryPath) {
    return this._exportExcel(AJAX_PATH.exportInfrastructureReturn + queryPath);
  }

  // 转库列表导出
  transferlibrarylistExport(queryPath) {
    return this._exportExcel(AJAX_PATH.transferlibrarylistExport + queryPath);
  }

  // 形态转换列表导出
  exportTransformationOut(queryPath) {
    return this._exportExcel(AJAX_PATH.exportTransformationOut + queryPath);
  }
}


const upload = function (param, resolve) {
  service({
    method: "post",
    url: AJAX_PATH.upload,
    headers: { "Content-Type": "multipart/form-data" },
    data: param,
  }).then(function (response) {
    const data = response.data;
    if (data.success) {
      resolve(data);
    }
  });
};



const uploadExcel = function (param, resolve) {
  service({
    method: "post",
    url: AJAX_PATH.uploadExcel,
    headers: { "Content-Type": "multipart/form-data" },
    data: param,
    timeout: 60 * 1000 * 10
  }).then(function (response) {
    const data = response.data;
    if (data.success) {
      resolve(data);
    }
  });
};

// 获取图片路径
const getStaticFileURL = function (images, subStr) {
  if (!subStr) subStr = "http";
  if (images && images.startsWith(subStr)) {
    return images;
  } else {
    if (images && images.length > 0 && images.indexOf("[") == -1) {
      return AJAX_PATH.getStaticFileURL + "/" + images;
    }
  }
};
export { CommonAjax, upload, uploadExcel, getStaticFileURL };
